package mapping;

/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2020-01-04 14:32
 * @notify  封装Statement
 * @version 1.0
 */

import sqlsource.SqlSource;

public class MappedStatement {

    public MappedStatement(String statementId, Class<?> parameterTypeClass, Class<?> resultTypeClass,
                           String statementType, SqlSource sqlSource, String sqlType) {
        this.statementId = statementId;
        this.parameterTypeClass = parameterTypeClass;
        this.resultTypeClass = resultTypeClass;
        this.statementType = statementType;
        this.sqlSource = sqlSource;
        this.sqlType = sqlType;
    }

    //statement类型，是 statement 还是 preparedStatement
    private String statementType;

    //SqlSource是获取Sql语句的
    private SqlSource sqlSource;

    //入参类型
    private Class<?> parameterTypeClass;

    //返回值类型
    private Class<?> resultTypeClass;

    //statementId
    private String statementId;

    private String sqlType;

    public SqlSource getSqlSource() {
        return sqlSource;
    }

    public void setSqlSource(SqlSource sqlSource) {
        this.sqlSource = sqlSource;
    }

    public String getStatementType() {
        return statementType;
    }

    public void setStatementType(String statementType) {
        this.statementType = statementType;
    }

    public Class<?> getParameterTypeClass() {
        return parameterTypeClass;
    }

    public void setParameterTypeClass(Class<?> parameterTypeClass) {
        this.parameterTypeClass = parameterTypeClass;
    }

    public Class<?> getResultTypeClass() {
        return resultTypeClass;
    }

    public void setResultTypeClass(Class<?> resultTypeClass) {
        this.resultTypeClass = resultTypeClass;
    }

    public String getStatementId() {
        return statementId;
    }

    public void setStatementId(String statementId) {
        this.statementId = statementId;
    }
}
